import request from '@/utils/request'
import * as proxy from '@/constants/proxy'

//新增数据
export function getAdd(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/teaminnovate/add',
    method: 'post',
    data,
  })
}

//修改数据
export function getUpdate(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/teaminnovate/update',
    method: 'post',
    data,
  })
}

// 列表数据
export function getList(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/teaminnovate/list',
    method: 'post',
    data,
  })
}

//上传附件
export function addFiles(data: any) {
  return request({
    url: '/kjsl/teaminnovate/addFile',
    method: 'post',
    data,
  })
}

//获取详情
export function getDetail(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/teaminnovate/getDetailById/${id}`,
    method: 'get',
  })
}

//批量删除数据
export function getDelect(ids: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/teaminnovate/${ids}`,
    method: 'delete',
  })
}
